#ifndef OEVENTHANDLER_H
#define OEVENTHANDLER_H
#include <OObject.h>

template <typename T>  class OEventHandler:public OObject{
	public:
		OEventHandler(T &t,void (T::*pfn)(void *,void *,void *),void *arg1,void *arg2,void *arg3){
				m_t=t;
				m_pfn=pfn;
				m_arg1=arg1;
				m_arg2=arg2;
				m_arg3=arg3;
		}

		void Handler(){
			(m_t.*m_pfn)(m_arg1,m_arg2,m_arg3);
		}
		
		~OEventHandler(){}

	private:
		T m_t;  
		void (T::*m_pfn)(void *,void *,void *);  
		void *m_arg1,*m_arg2,*m_arg3;
};

#endif
